package croleta.core.file;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

/**
 * <b><code>InfoFile:</code></b><br><br>
 * This Class Object scans the info file.<br>
 * than it breaks it up for the use.
 * @author eyalshalev
 */
public class InfoFile extends JSONFile {

	/**
	 * <b>InfoFile:</b><br>
	 * The Class initialization method.<br>
	 * It passes the given path to the super class {@link JSONFile}.<br>
	 *TODO add description...
	 * @param path the file's path.
	 * @throws ServletException
	 */
	public InfoFile(String path, ServletContext servletContext) throws ServletException {
		super(path, servletContext);
		modules = childToStringArray("modules");
		theme = childToString("theme");
	}
	
	private String[] modules;
	/**
	 * @return the active modules names.
	 */
	public String[] getModules() {
		return modules;
	}
	
	private String theme;
	/**
	 * @return the active theme name.
	 */
	public String getTheme() {
		return theme;
	}
}
